|
|
|
|
|
|
|
Dim cField3 As String
Dim cField4 As String
'
cField1 = "Name"
cField2 = "AuID"
cField3 = "Contracted"
cField4 = "Cover"
'
Text1.DataField = cField1
Label1.DataField = cField2
Check1.DataField = cField3
OLE1.DataField = cField4
End Sub |
|
|
|
|
|
|
|
|
Figure 4.9.
Adding the bound OLE control. |
|
|
|
|
|
|
|
|
Save and run the project. You'll now see icons displayed in the top-right corner of the form (only for the first few records). These icons are stored in the binary data type field of the database. Note that you don't have to do any fancy "loading" of the picture into the OLE control, because the data control binding handles all that for you! |
|
|
|
|
|
|
|
|
When you run your completed project, it should look like the one shown in Figure 4.10. |
|
|
|
|
|
|
|
|
Figure 4.10.
The completed project. |
|
|
|
|
|
|
|
|
You have just completed a form that contains bound controls for handling text, numeric, Boolean, and OLE object data types stored in a database. |
|
|
|
|
|